/**
 * Project SearchEngine
 */


//对外接口类
#ifndef _PAGELIB_H
#define _PAGELIB_H

#include "FileProcessor.h"
#include "DirScanner.h"
#include <string>
#include <vector>
#include <utility>
#include <map>

using std::string;
using std::vector;
using std::map;
using std::make_pair;
using std::pair;

class Configuration;
class DirScanner;
class FileProcessor;

class PageLib {
public: 
    /* PageLib(Configuration& conf, DirScanner& DirScanner, */
    /*         FileProcessor& FileProcessor); */
    PageLib();
    ~PageLib();    

    void create(const string& dirname);
    
    void store();
private: 
    /* string _filename; */
    vector<RSSItem> _pages;
    vector<string> _files;
    map< int, pair<int,int> > _offsetLib;
    DirScanner _dirScanner;
    FileProcessor _fileProcessor;
};

#endif //_PAGELIB_H
